package designs.models.proxy.example.three;

import java.rmi.Naming;
import java.rmi.Remote;

import javax.swing.JFrame;

public class Client {
	public static void main(String[] args) {
		try {
			Remote obj = Naming.lookup("rmi://127.0.0.1/Server01");
			RemoteWindow remoteWindow = (RemoteWindow)obj;
			remoteWindow.setName("c://rmi_demo/Server01/Hello.txt");
			JFrame frame = remoteWindow.getWindow();
			frame.setVisible(true);
			frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
